package com.solution.model;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * UserRolePermission
 */
@Entity
@Table(name="User_Role_Permission"
    ,schema="public"
)
public class UserRolePermission extends AbstractPO
 {

	
	private static final long serialVersionUID = 1L;
	
    private UserRolePermissionId id;
    private UserPermissionType userPermissionType;
    private UserRoleType userRoleType;

     @EmbeddedId
    
    @AttributeOverrides( {
        @AttributeOverride(name="userRoleTypeId", column=@Column(name="User_Role_TypeID", nullable=false, precision=10, scale=0) ), 
        @AttributeOverride(name="userPermissionTypeId", column=@Column(name="User_Permission_TypeID", nullable=false, precision=10, scale=0) ) } )
    public UserRolePermissionId getId() {
        return this.id;
    }
    
    public void setId(UserRolePermissionId id) {
        this.id = id;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="User_Permission_TypeID", nullable=false, insertable=false, updatable=false)
    public UserPermissionType getUserPermissionType() {
        return this.userPermissionType;
    }
    
    public void setUserPermissionType(UserPermissionType userPermissionType) {
        this.userPermissionType = userPermissionType;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="User_Role_TypeID", nullable=false, insertable=false, updatable=false)
    public UserRoleType getUserRoleType() {
        return this.userRoleType;
    }
    
    public void setUserRoleType(UserRoleType userRoleType) {
        this.userRoleType = userRoleType;
    }




}


